/**
 * Creat with IntelliJ IDEA
 * Description:图书类
 * User:WZW
 * Date:2021-11-27
 * Time:17:40
 */
package BOOK;
public class Book {
    private String name;//书名
    private String author;//作者
    private String publisher;//出版社
    private float price;//价格
    private boolean isBorrowed;//借出情况

    public Book(String name, String author, String publisher, float price) {
        this.name = name;
        this.author = author;
        this.publisher = publisher;
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getPublisher() {
        return publisher;
    }

    public void setPublisher(String publisher) {
        this.publisher = publisher;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public boolean isBorrowed() {
        return isBorrowed;
    }

    public void setBorrowed(boolean borrowed) {
        isBorrowed = borrowed;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", publisher='" + publisher + '\'' +
                ", price='" + price + '\'' +", "+
                (isBorrowed==true?"已借出":"未借出")+"}";
    }
}
